package com.ruoyi.material_receive.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.material_receive.mapper.MaterialReceiveMapper;
import com.ruoyi.material_receive.domain.MaterialReceive;
import com.ruoyi.material_receive.service.IMaterialReceiveService;

/**
 * 物资领取Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-22
 */
@Service
public class MaterialReceiveServiceImpl implements IMaterialReceiveService 
{
    @Autowired
    private MaterialReceiveMapper materialReceiveMapper;

    /**
     * 查询物资领取
     * 
     * @param receiveId 物资领取主键
     * @return 物资领取
     */
    @Override
    public MaterialReceive selectMaterialReceiveByReceiveId(Long receiveId)
    {
        return materialReceiveMapper.selectMaterialReceiveByReceiveId(receiveId);
    }

    /**
     * 查询物资领取列表
     * 
     * @param materialReceive 物资领取
     * @return 物资领取
     */
    @Override
    public List<MaterialReceive> selectMaterialReceiveList(MaterialReceive materialReceive)
    {
        return materialReceiveMapper.selectMaterialReceiveList(materialReceive);
    }

    /**
     * 新增物资领取
     * 
     * @param materialReceive 物资领取
     * @return 结果
     */
    @Override
    public int insertMaterialReceive(MaterialReceive materialReceive)
    {
        return materialReceiveMapper.insertMaterialReceive(materialReceive);
    }

    /**
     * 修改物资领取
     * 
     * @param materialReceive 物资领取
     * @return 结果
     */
    @Override
    public int updateMaterialReceive(MaterialReceive materialReceive)
    {
        return materialReceiveMapper.updateMaterialReceive(materialReceive);
    }

    /**
     * 批量删除物资领取
     * 
     * @param receiveIds 需要删除的物资领取主键
     * @return 结果
     */
    @Override
    public int deleteMaterialReceiveByReceiveIds(Long[] receiveIds)
    {
        return materialReceiveMapper.deleteMaterialReceiveByReceiveIds(receiveIds);
    }

    /**
     * 删除物资领取信息
     * 
     * @param receiveId 物资领取主键
     * @return 结果
     */
    @Override
    public int deleteMaterialReceiveByReceiveId(Long receiveId)
    {
        return materialReceiveMapper.deleteMaterialReceiveByReceiveId(receiveId);
    }
}
